import 'package:flutter/cupertino.dart';
import 'package:flutter_news/common/entity/entitys.dart';
import 'package:flutter_news/common/utils/utils.dart';

/// 用户
class UserAPI {
  /// 登录
  static Future<UserLoginResponseEntity> login(
      {required BuildContext context, UserLoginRequestEntity? params}) async {
    var response =
        await HttpUtil().post(context: context, '/user/login', params: params);
    print(response.toString());
    return UserLoginResponseEntity.fromJson(response);
  }
}
